Page({
  data: {
    statusBarHeight: 0,
    printerConnected: true,
    printerName: 'HP LaserJet Pro MFP M126nw'
  },

  onLoad() {
    this.setData({
      statusBarHeight: wx.getSystemInfoSync().statusBarHeight || 0
    });
  },

  goBack() {
    wx.navigateBack();
  },

  searchPrinter() {
    wx.showLoading({ title: '搜索中...' });
    setTimeout(() => {
      wx.hideLoading();
      wx.showToast({
        title: '搜索打印机功能开发中',
        icon: 'none'
      });
    }, 1500);
  }
});
